package com.example;

import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;

public class Event {
    public static void main(String [] args){
        Schema schema=new Schema(1,"com.lanou.sinasports.greenevents");
        //创建第一张表
        Entity events=schema.addEntity("Eve");
        //数据库字段名
        events.addLongProperty("_id").primaryKey().autoincrement();
        events.addStringProperty("name");
        events.addStringProperty("clogo");
        events.addStringProperty("logo");

        Entity mathot=schema.addEntity("MatHot");
        mathot.addLongProperty("_id").primaryKey().autoincrement();
        mathot.addStringProperty("date");
        mathot.addStringProperty("title");
        mathot.addStringProperty("round");
        mathot.addStringProperty("flag1");
        mathot.addStringProperty("team1");
        mathot.addStringProperty("score1");
        mathot.addStringProperty("flag2");
        mathot.addStringProperty("team2");
        mathot.addStringProperty("score2");


        try {
            new DaoGenerator().generateAll(schema,"./app/src/main/java");
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
